<?php

    /**
     * Writes the url corresponding to the given action
     *
     * @param       string       $selector : selector action
     * @param       array        $params : parameters for the url
     * @param       boolean      $escape : if true, then escape the string for html
     * @return      string
     */

    function Dwoo_Plugin_getpourcentage(Dwoo $dwoo, $price, $newprice)
    {

        $res=100-round(100*($price-$newprice)/$price);
        return $res;
    }